package cn.wolfcode.p2p.business.service;

import com.github.pagehelper.PageInfo;

import cn.wolfcode.p2p.business.domain.CreditTransfer;
import cn.wolfcode.p2p.business.query.CreditTransferQueryObject;

/**
 * 债权转让相关服务
 * 
 * @author wolfcode
 *
 */
public interface ICreditTransferService {

	/**
	 * 列出当前用户可以转让的债权标
	 * 
	 * @param qo
	 * @return
	 */
	PageInfo<CreditTransfer> listCanTransferCredit(CreditTransferQueryObject qo);

	/**
	 * 创建债权转让标
	 * 
	 * @param bidId
	 */
	void creditTransfer(Long[] bidId);

	PageInfo<CreditTransfer> query(CreditTransferQueryObject qo);

	/**
	 * 认购债权转让标
	 * 
	 * @param id
	 */
	void subscribe(Long id);

	/**
	 * 根据bidid找到正在招标中的债权标
	 * 
	 * @param bidId
	 * @return
	 */
	CreditTransfer findNeedCancel(Long bidId);

	/**
	 * 撤销债权标
	 * 
	 * @param cancel
	 */
	void cancel(CreditTransfer cancel);

}
